<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<%@ include file="/common/taglib.jsp" %>
<%@ include file="/common/common.jsp" %>    
<base href="<%=basePath%>">
<title>装修常识列表</title>
</head>
<body>
<div class="container">
<h2 class="bg-info">装修常识列表</h2>
<a href="main/index.html">返回主页</a>&nbsp;&nbsp; <a href="knowledge/knowledgeAddUI.html">添加装修常识</a>
<br/>
<br/>
<table class="table table-bordered table-hover">
<thead>
<tr>
	<th>title</th>
	<th>content</th>
	<th>封面图片</th>
	<th>创建时间</th>
	<th>操作</th>
</tr>
</thead>
<c:forEach items="${knowledges }" var="k">
	<tr>
		<td><a href="#">${k.title}</a></td>
		<td width="350px">${fn:substring(k.content, 0, 200)}</td>
		<td><a href="${k.coverPhoto }"><img src="${k.coverPhoto}" width="200px" height="200px"/></a></td>
		<td>${k.createDate}</td>
		<td><a href="knowledge/del.html?id=${k.id }">删除</a> | <a href="knowledge/editUI.html?id=${k.id }">编辑</a> |&nbsp;<c:if test="${k.play == 0 }"><a href="play/add.html?playType=knowledge&playId=${k.id }&title=${k.title}">设置为轮播</a></c:if><c:if test="${k.play > 0 }"><a href="javascript:void(0)">已为轮播项</a></c:if></td>
	</tr>
</c:forEach>
</table>
<a href="main/index.html">返回主页</a>&nbsp;&nbsp; <a href="knowledge/knowledgeAddUI.html">添加装修常识</a>
</div>
</body>
</html>

